package com.doyoo.pojo;

import com.doyoo.enums.Type;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
public class AddJobTemplateDto {
    @NotEmpty(message = "'name'不能为空")
    @Schema(description = "定时任务步骤模板名称")
    private String name;

    @NotNull(message = "'type'不能为空")
    @Schema(description = "类型，1 shell，2 python")
    private Type type;

    @NotEmpty(message = "'script'不能为空")
    @Schema(description = "脚本模板")
    private String script;

    @NotEmpty(message = "'parameter'不能为空")
    @Schema(description = "脚本模板中的参数值, JSON格式")
    private String parameter;

    @Schema(description = "状态，0正常，1删除")
    private Integer state;
}
